
 
 F u n c t i o n :   g e t D C ( s t r i n g I d O r O b j e c t ,   b o o l I n c l u d e F r o m B o u n d ) 
 
 
 
 D e s c r i p t i o n :   R e t u r n   t h e   r e g i s t e r e d   D C   o b j e c t   b o u n d   t o   a   s p e c i f i c   s t r i n g   I D   o r   o b j e c t . 
 
 
 
 R e t u r n s :   D C   O b j e c t . 
 
 
 
 N o t e :   I D   r e f e r s   t o   t h e   m a t c h i n g   D C . i d   p r o p e r t y   v a l u e   o f   a   r e g i s t e r e d   D C   o b j e c t .   T h e   I D   o f   a   D C   o b j e c t   m u s t   a l w a y s   b e   u n i q u e .   S i n c e   g e t D C ( )   i s   a   d e f a u l t   f u n c t i o n   f o r   $ A ,   t h e   s y n t a x   $ A ( s t r i n g O r O b j e c t I D )   w i l l   p e r f o r m   t h e   s a m e   a c t i o n   a s   $ A . g e t D C ( s t r i n g O r O b j e c t I D ) .   A f t e r   a   D C   o b j e c t   i s   r e t u r n e d ,   o n l y   v a l i d   p r o p e r t i e s   a n d   m e t h o d s   s p e c i f i e d   i n   t h e   D C   A P I   a r e   a v a i l a b l e   o n   t h a t   o b j e c t .   W h e n   b o o l I n c l u d e F r o m B o u n d   i s   t r u e ,   t h e   b o u n d   D C   o b j e c t   w i l l   b e   r e t u r n e d   i f   p r e s e n t   o n   t h e   s p e c i f i e d   t r i g g e r i n g   e l e m e n t . 
 
 
 
 I m p o r t a n t :   W h e n   u s i n g   t h e   g e t D C ( )   f u n c t i o n   t o   r e t u r n   t h e   b o u n d   D C   o b j e c t   o n   a   t r i g g e r i n g   e l e m e n t ,   i t   w i l l   o n l y   r e t u r n   t h e   l a s t   D C   o b j e c t   b o u n d   t o   t h a t   e l e m e n t .   V i e w   t h e   d i r e c t i o n s   a t   t h e   e n d   o f   t h i s   f i l e   t o   r e t u r n   a   m a p   o f   m u l t i p l e   D C   o b j e c t s   w h e n   b o u n d   t o   t h e   s a m e   t r i g g e r i n g   e l e m e n t . 
 
 
 
 E x a m p l e : 
 
 
 
 / /   G e t   t h e   r e g i s t e r e d   D C   o b j e c t   w i t h   D C . i d   =   " m y D C O b j e c t I D " 
 
 v a r   D C   =   $ A . g e t D C ( " m y D C O b j e c t I D " ) ; 
 
 
 
 / /   G e t   t h e   r e g i s t e r e d   D C   o b j e c t   w h e r e   D C . i d   i s   s e t   t o   a   D O M   e l e m e n t . 
 
 v a r   D C   =   $ A . g e t D C ( d o m E l e m e n t ) ; 
 
 
 
 / /   G e t   t h e   D C   o b j e c t   b o u n d   t o   a   t r i g g e r i n g   e l e m e n t . 
 
 v a r   D C   =   $ A . g e t D C ( t r i g g e r i n g E l e m e n t ,   t r u e ) ; 
 
 
 
 / /   O r   t h e   s a m e   u s i n g   c h a i n i n g 
 
 
 
 / /   G e t   t h e   r e g i s t e r e d   D C   o b j e c t   w i t h   D C . i d   =   " m y D C O b j e c t I D " 
 
 v a r   D C   =   $ A ( " m y D C O b j e c t I D " ) ; 
 
 
 
 / /   G e t   t h e   r e g i s t e r e d   D C   o b j e c t   w h e r e   D C . i d   i s   s e t   t o   a   D O M   e l e m e n t   a s   i t s   t r i g g e r . 
 
 v a r   D C   =   $ A ( d o m E l e m e n t ) ; 
 
 
 
 / /   G e t   t h e   D C   o b j e c t   b o u n d   t o   a   t r i g g e r i n g   e l e m e n t . 
 
 v a r   D C   =   $ A ( t r i g g e r i n g E l e m e n t ) . g e t D C ( t r u e ) ; 
 
 
 
 / /   W h e n   m u l t i p l e   D C   o b j e c t s   a r e   b o u n d   t o   t h e   s a m e   e l e m e n t ,   d o   t h e   f o l l o w i n g   i n s t e a d . 
 
 
 
 / /   G e t   a   m a p   o f   a l l   b o u n d   D C   o b j e c t s . 
 
 
 
 v a r   m a p   =   $ A . d a t a ( t r i g g e r i n g E l e m e n t ,   " D C - O N " ) ; 
 
 
 
 / /   T h e n   l o o p   t h r o u g h   t h e   m a p   t o   a c c e s s   e a c h   D C   o b j e c t   a n d   t h e i r   p r o p e r t i e s   a n d   m e t h o d s . 
 
 
 
 $ A . l o o p ( m a p ,   f u n c t i o n ( i n d e x N u m b e r ,   D C )   { 
 
     / /   D o   s o m e t h i n g   w i t h   t h e   D C   o b j e c t . 
 
     a l e r t ( D C . i d ) ; 
 
 } ,   " m a p " ) ; 
 
 